package com.booklove.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.booklove.domain.po.Donatebook;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.booklove.domain.query.DonatebookQuery;
import com.booklove.domain.vo.DonatebookVO;

import java.util.List;

/**
 * <p>
 * 捐赠书信息 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-09-21
 */
public interface DonatebookMapper extends BaseMapper<Donatebook> {


    /**
     * 和books进行联表，然后order查询信息（一对一关系表）
     * @param page
     * @param donatebookQuery
     * @return
     */
    Page<DonatebookVO> selectPageVO(IPage<Donatebook> page, DonatebookQuery donatebookQuery);

    /**
     * 根据id查询一个DonatebookVO对象
     * @param id
     * @return
     */
    DonatebookVO getVOById(Integer id);
}
